#ifndef FND_GAME_LIGHT_SERVER_ADAPTOR_H
#define FND_GAME_LIGHT_SERVER_ADAPTOR_H
#include <ltbasedefs.h>
#include <ltengineobjects.h>
class light_server_adaptor : public BaseClass {
public:
    light_server_adaptor() ;
    ~light_server_adaptor() {}
    uint32 OnPrecreate(ObjectCreateStruct* pData, float fdata) ;
    uint32 OnUpdate() ;
    uint32 OnObjectCreated(float type) ;
public:
    const LTVector& color() {return m_color ;}
    const LTVector& direction() {return m_direction ;}
private:
    void read_props(ObjectCreateStruct* pStruct) ;
    LTVector m_color ;
    LTVector m_direction ;
    LTVector m_attenuation ;
    bool m_has_added_to_system ;
    bool m_is_dir_light ;

    void try_to_added_to_light_system() ;
    
} ;
#endif
